package com.gis.bigdata.spark.core.test

import java.io.{ObjectOutputStream, OutputStream}
import java.net.Socket

/**
 * @author LnnuUser
 * @create 2021-08-25-下午8:34
 */
object Driver {

  def main(args: Array[String]): Unit = {

    //连接服务器
    val client = new Socket("localhost", 9999)

    val out: OutputStream = client.getOutputStream

    val objOut: ObjectOutputStream = new ObjectOutputStream(out)

    val task: Task = new Task()
    objOut.writeObject(task)
    objOut.flush()
    objOut.close()
    client.close()

    println("数据发送完毕")
  }

}
